<template>
  <button class="btn btn-sm btn-primary" @click="showModal">新增广告</button>
  <vue-modal
    title="新增广告"
    ok-text="提交"
    cancel-text="取消"
    :show.sync="modalStatus"
    effect="fade"
    :small="true"
    :width="500"
    :callback="submit">
    <div slot="modal-body" class="modal-body">
      <form class="form-horizontal" role="form">
        <div class="form-group form-group-sm">
          <label class="col-sm-3 control-label">*任务名</label>
          <div class="col-sm-9 text-left">
            <input type="text" class="form-control" v-model="ad.name">
          </div>
        </div>
        <div class="form-group form-group-sm">
          <label class="col-sm-3 control-label">*广告图</label>
          <div class="col-sm-9 text-left">
            <input type="file" class="form-control" accept="image/jpeg,image/png" v-model="ad.picFile" v-el:file>
          </div>
        </div>
        <div class="form-group form-group-sm">
          <label class="col-sm-3 control-label">*跳转链接</label>
          <div class="col-sm-9 text-left">
            <input type="text" class="form-control" v-model="ad.location">
          </div>
        </div>
        <div class="form-group form-group-sm">
          <label class="col-sm-3 control-label">*券商code</label>
          <div class="col-sm-9 text-left">
            <input type="text" class="form-control" v-model="ad.securityCode">
          </div>
        </div>
      </form>
    </div>
  </vue-modal>
</template>
<style src="./open-ad-new.css" scoped></style>
<script src="./open-ad-new.js"></script>
